package org.example.controller;

import org.example.dao.PollutantDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class PollutantController {
    @Autowired
    private PollutantDao pollutantDao;

    @RequestMapping("/poll/findPoll")
    public List<Map<String,Object>> findPoll(){
        List<Map<String,Object>> result =
                pollutantDao.findPoll();
        return result;
    }
}
